package com.hsmpay.mobile.service.finance.impl;

import com.hsmpay.common.service.impl.BaseServiceSupport;
import com.hsmpay.mobile.dao.finance.BatchClearLogDao;
import com.hsmpay.mobile.pojo.finance.BatchClearLog;
import com.hsmpay.mobile.service.finance.BatchClearLogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 结算文件服务接口 
 * @author 颜铃璋
 * 创建时间： 2013-6-4
 * 对应 batchClearDao
 */
@Service("batchClearLogService")
public class BatchClearLogServiceImpl extends BaseServiceSupport<BatchClearLog, Long> implements BatchClearLogService<BatchClearLog, Long> {
	//结算日志DAO
	@Resource(name="batchClearLogDao")
	private BatchClearLogDao<BatchClearLog, Long> bclDao;
	
	/**
	 * 查询佣金结算日志列表
	 * @param bcl
	 * @return
	 * @throws Exception
	 */
	public List<BatchClearLog> getBrokerageLogs(BatchClearLog bcl) throws Exception{
		return bclDao.getBrokerageLogs(bcl);
	}
	
	/**
	 * 查询 是否有未完成的 日志结算
	 * @param bcId
	 * @return
	 * @throws Exception
	 */
	public int getUnfinishLogCountByBcId(Long bcId) throws Exception{
		return bclDao.getUnfinishLogCountByBcId(bcId);
	}

	/**
	 * 查询金额和笔数
	 * @param batchClearLog
	 * @return
	 * @throws Exception
	 */
	public BatchClearLog getTransMoney(BatchClearLog batchClearLog) throws Exception {
		return bclDao.getTransMoney(batchClearLog);
	}

	/**
	 * 查看结算日志详情
	 * @param batchClearLog
	 * @return
	 * @throws Exception
	 */
	public List<BatchClearLog> searchLogDetialsList(BatchClearLog batchClearLog) throws Exception {
		return bclDao.searchLogDetialsList(batchClearLog);
	}

	/**
	 * 结算日志详情统计数
	 * @param batchClearLog
	 * @return
	 * @throws Exception
	 */
	public int getLogDetailsCount(BatchClearLog batchClearLog) throws Exception {
		return bclDao.getLogDetailsCount(batchClearLog);
	}

	/**
	 * 查询金额和笔数
	 * @param batchClearLog
	 * @return
	 * @throws Exception
	 */
	public BatchClearLog getTransMoneyByIds(BatchClearLog batchClearLog) throws Exception {
		return bclDao.getTransMoneyByIds(batchClearLog);
	}

	@Override
	public List<Map<String, Object>> selectNotInZxbackCodeByBcfIds(Map parameterMap) {
		return bclDao.selectNotInZxbackCodeByBcfIds(parameterMap);
	}
}
